<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head lang="en">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="format-detection" content="email=no"/>
    <meta charset="UTF-8">
    <script type="text/javascript" th:src="@{${session.baseUrl}+'js/common.js'}"></script>
    <script th:src="@{${session.baseUrl}+'js/jquery.js'}"></script>
    <link th:href="@{${session.baseUrl}+'style/reset.css'}" rel="stylesheet" type="text/css">
    <link th:href="@{${session.baseUrl}+'style/base.css'}" rel="stylesheet" type="text/css">
    <link th:href="@{${session.baseUrl}+'style/header.css'}" rel="stylesheet" type="text/css">
    <link rel="stylesheet" th:href="@{${session.baseUrl}+'style/myProject.css'}"/>
    <title>收支明细</title>
</head>
<body>
<header><a th:href="@{/wap/mine.html}"><span></span></a>收支明细</header>
<nav>
    <ul class="df jcsb bgwh">
        <li class="tc fx1 " onclick="window.location.href='supportList'">收入</li>
        <li class="tc fx1 active">支出</li>

    </ul>
</nav>
<table>

    <ul id="content0" class="content" th:if="${memberWalletRecordList!=null}">
        <li th:each="wr,iterStat:${memberWalletRecordList}">
            <a>
                <div class="container">
                    <p class="intro" th:text="${wr.projectName}" style=" display:inline-block;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;"></p>
                </div>
                <div class="message">
                    <div>
                        <div class="f22 g9">时间：<br><span class="f26" th:text="${#dates.format(wr.createTime,'yyyy-MM-dd HH:mm:ss')}"></span></div>
                    </div>
                    <div>
                        <div class="f22 g9">交易金额：<br><span class="f26 money" th:text="${#numbers.formatDecimal(wr.money,1,2)}"></span></div>
                    </div>
                    <div>
                        <div  class="f22 g9">收支类型：<br><span class="f26 " style="color: #2d9cff;" >支出</span></div>
                    </div>
                </div>
            </a>
        </li>
    </ul>
</table>
<div th:if="${memberWalletRecordList==null || memberWalletRecordList.size()==0}">
    <img th:src="@{${session.baseUrl}+'\images\zanwu.png'}" style="width: 8.5rem;height:5.2rem;transform: translate(0rem, 0rem);"/>
</div>
<script type="text/javascript" th:inline="javascript">
    var basePath = /*[[${#httpServletRequest.getScheme() + "://" + #httpServletRequest.getServerName() + ":" + #httpServletRequest.getServerPort() + #httpServletRequest.getContextPath()}]]*/;

    var num = 1;
    $(function () {
        $(window).scroll(
            function () {

                if ((document.documentElement.scrollHeight) == (document.documentElement.scrollTop | document.body.scrollTop) + document.documentElement.clientHeight) {
                    num = num + 1;

                    $.ajax({
                        type: "POST",
                        data: {
                            current: num,
                            memberId:/*[[${session.memberId}]]*/,
                        },
                        url: basePath + '/wap/MemberWalletRecord/pageListzhichu',
                        cache: false,
                        /*async:true,    //true：异步，false：同步。*/
                        success: function (data) {

                            str = '';
                            $.each(data, function (index, value) {
                                str += '<li>';
                                str += '<a>';
                                str += '<div class="container">';
                                str += '<p class="intro" style=" display:inline-block;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" >&nbsp;' + value.projectName + '</p>';
                                str += '</div>';
                                str += '<div class="message">';
                                str += '<div>';
                                str += ' <div class="f22 g9">时间：<br><span class="f26 " >' + value.createTime + '</span></div>';
                                str += '</div>';
                                str += '<div>';
                                str += '<div class="f22 g9">交易金额：<br><span class="f26 money">' + value.money.toFixed(2) + '</span></div>';
                                str += '</div>';
                                str += '<div class="f22 g9">收支类型：<br><span class="f26 " style="color: #2d9cff;" >支出</span></div>';
                                str += '</div>';
                                str += '</a>';
                                str += '</li>';
                            });
                            $("#content0").append(str); //动态加载插入HTML
                        },
                        error: function () {
                            alert("ajax请求失败");
                        }
                    })


                }
            });
    });


</script>
</body>
</html>